import request from './request.js'

const urls = {
  catelist: '/wx/atcivte/catelogList',
  getBycate: '/wx/atcivte/getByCatelog',
  getPyq: '/wx/activeFirst/list',
  dianzan: '/wx/activeFirst/thumbsUp',
  shares: '/share/getShareData',
  tjshare: '/wx/atcivte/share',
  copylink: '/wx/atcivte/copyLink'
}

export function getcate () {
  return request({
    url: urls.catelist,
    method: 'get'
  })
}

export function tjshare () {
  return request({
    url: urls.tjshare,
    method: 'get'
  })
}
export function getlistBycate (catelog) {
  return request({
    url: urls.getBycate,
    method: 'post',
    data: catelog
  })
}

export function getPengyq () {
  return request({
    url: urls.getPyq,
    method: 'get'
  })
}

export function dianzans (id) {
  return request({
    url: urls.dianzan,
    method: 'post',
    data: {
      id: id
    }
  })
}

export function copylinknote (id) {
  return request({
    url: urls.copylink,
    method: 'post',
    data: {
      id: id
    }
  })
}

export function getshareinfo (urlitem) {
  return request({
    url: urls.shares,
    method: 'post',
    data: {
      url: urlitem
    }
  })
}
